package com.invest;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.web.SpringBootServletInitializer;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * <p>注释</p>
 *
 * @author yuyizhao
 * @version v0.1 2016/2/29 Exp
 */
@SpringBootApplication
@Controller
public class Application  extends SpringBootServletInitializer {

    public static void main(String[] args) {

        SpringApplication.run(com.invest.Application.class, args);
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(applicationClass);
    }

    private static Class<com.invest.Application> applicationClass = com.invest.Application.class;

    @RequestMapping(value ="/", method = RequestMethod.GET)
    @ResponseBody
    public String home()
    {
        return "success";
    }

}
